/*
 * usb_cmd_handler.h
 *
 *  Created on: Mar 22, 2025
 *      Author: wzx05
 */

#ifndef APP_USB_CMD_HANDLER_H_
#define APP_USB_CMD_HANDLER_H_

#include <stdint.h>
#include <Motor\stepper_cfg.h> // 需要调用给全局电机组相关属性


typedef enum {
    CMD_SUCCESS,
	CMD_ERR_SHORT_COMMAND,
    CMD_ERR_FORMAT,
    CMD_ERR_GROUP,
    CMD_ERR_PARAM_COUNT,
    CMD_ERR_DEG_VALUE
} CmdResult;

typedef struct {
	uint8_t group;
	float degrees[MOTORS_PER_GROUP];
} StepperCmd;

void handleCommand(uint8_t* data, uint32_t length);

#endif /* APP_USB_CMD_HANDLER_H_ */
